package com.tian.manager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tian.manager.entity.SysManager;
import com.tian.manager.mapper.SysManagerMapper;
import com.tian.manager.service.SysManagerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tian
 * @since 2020-05-15
 */
@Service
public class SysManagerServiceImpl extends ServiceImpl<SysManagerMapper, SysManager> implements SysManagerService {

    @Override
    public SysManager findByName(String username) {
        QueryWrapper<SysManager> wrapper = new QueryWrapper<>();
        wrapper.eq("manager_name",username);
        SysManager sysManager = baseMapper.selectOne(wrapper);
        return sysManager;
    }
}
